package v1

import (
	"github.com/gogf/gf/v2/frame/g"
	"ruoyi-vue-pro-go/api/common"
	"ruoyi-vue-pro-go/internal/model/entity"
)

type GetSimpleListReq struct {
	g.Meta `path:"/admin-api/system/dept/simple-list" method:"get" tags:"dept" summary:"Get dept list"`
}
type GetSimpleListRes struct {
	List []*entity.SystemDept `json:"list" dc:"dept list"`
}

type GetPageReq struct {
	g.Meta `path:"/admin-api/system/dept/page" method:"get" tags:"Dept Page" summary:"Get dept pages"`
	*common.CommonPageReq
}
type GetPageRes struct {
	List []*entity.SystemDept `json:"list" dc:"dept pages"`
	*common.CommonPageRes
}

type GetListReq struct {
	g.Meta `path:"/admin-api/system/dept/list" method:"get" tags:"Dept list" summary:"Get dept list"`
}
type GetListRes struct {
	List []*entity.SystemDept `json:"list" dc:"dept list"`
}

type CreateReq struct {
	g.Meta       `path:"/admin-api/system/dept/create" method:"post" tags:"dept" permission:"system:dept:create" summary:"Create dept"`
	Name         string `v:"required" dc:"部门名称"`
	ParentId     int64  `v:"required" dc:"父部门id"`
	Sort         int    `v:"required" dc:"显示顺序"`
	LeaderUserId int64  `dc:"负责人"`
	Phone        string `v:"required" dc:"联系电话"`
	Email        string `dc:"邮箱"`
	Status       int    `v:"required" dc:"部门状态（0正常 1停用）"`
	Creator      string `dc:"创建者"`
	Updater      string `dc:"更新者"`
	TenantId     int64  `dc:"租户编号"`
}
type CreateRes struct{}

type DeleteReq struct {
	g.Meta `path:"/admin-api/system/dept/delete" method:"delete" tags:"dept" permission:"system:dept:delete" summary:"Delete dept"`
	Id     int64 `v:"required"`
}
type DeleteRes struct{}

type DeleteListReq struct {
	g.Meta `path:"/admin-api/system/dept/delete-list" method:"delete" tags:"dept" permission:"system:dept:delete" summary:"Delete dept list"`
	Ids    string `v:"required" dc:"部门id列表"`
}
type DeleteListRes struct{}

type UpdateReq struct {
	g.Meta       `path:"/admin-api/system/dept/update" method:"put" tags:"dept" permission:"system:dept:update" summary:"Update dept"`
	Id           int64  `v:"required" dc:"部门id"`
	Name         string `v:"required" dc:"部门名称"`
	ParentId     int64  `v:"required" dc:"父部门id"`
	Sort         int    `v:"required" dc:"显示顺序"`
	LeaderUserId int64  `dc:"负责人"`
	Phone        string `v:"required" dc:"联系电话"`
	Email        string `dc:"邮箱"`
	Status       int    `v:"required" dc:"部门状态（0正常 1停用）"`
	Creator      string `dc:"创建者"`
	Updater      string `dc:"更新者"`
	TenantId     int64  `dc:"租户编号"`
}
type UpdateRes struct{}
